English
The useCreateListingModal hook is used to list an item for sale on the Marketplace. It provides the necessary functionality to create and manage a new listing.
import { useCreateListingModal } from "@0xsequence/marketplace-sdk/react"; ## Into your React component: const { show: showListModal } = useCreateListingModal({ onError }); const onClickList = () => { showListModal({ collectionAddress, chainId, collectibleId, orderbookKind, }); }; return <button onClick={onClickList}>List</button>
Show child attributes
interface useCreateListingModal { onSuccess?: ({ hash, orderId }: { hash?: Hash; orderId?: string; }) => void; onError?: (error: Error) => void; }
interface ShowCreateListingModalArgs { collectionAddress: Hex; chainId: string; collectibleId: string; orderbookKind?: OrderbookKind; callbacks?: ModalCallbacks; }
Was this page helpful?